﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AMS.Core.ExtensionMethods
{
    public static class IEnumerableExtensions
    {
        // problem: returns list by default, not any other IEnumerable, which could cause a problem
        public static IEnumerable<T> ShallowCopy<T>(this IEnumerable<T> me)
        {
            List<T> copy = new List<T>();
            foreach (T p in me)
                copy.Add(p);

            return copy;
        }
    }
}
